<div class="container">
    <div class="col-lg-3 col-md-4 col-xs-6 thumb" style="margin-top: 20px;">
        <a class="thumbnail" href="#">
            <img class="img-responsive" src="http://placehold.it/750x400" id="review">
        </a>
    </div>

    <div class="clearfix"></div>

    <div style="width: 110%">
        <div class="progress" style="margin-left: 15px;width: 30%;display: none">
            <div class="progress-bar progress-bar-striped active" role="progressbar"
                 aria-valuenow="20"
                 aria-valuemin="0" aria-valuemax="100" style="width: 0%" id="progress_show">
                <span class="sr-only">100% Complete</span>
            </div>
        </div>
    </div>
    <br>

    <div class="form-group">
        <div class="col-sm-10">
            <input type="file" name="banner" id="upFile"
                   accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
        </div>
    </div>
    <div class="clearfix"></div>
    <br>
    <div class="form-group">
        <label for="banner_title" class="col-sm-2 control-label">封面名称:</label>
        <div class="col-sm-4">
            <input type="text" name="banner_title" id="banner_title" class="form-control" required="required">
        </div>
    </div>
    <div class="clearfix"></div>
    <br>
    <div class="form-group">
        <label for="banner_type" class="col-sm-2 control-label">Banner类别</label>
        <div class="col-sm-4">
            <select name="banner_type" id="banner_type" class="form-control">
                <option value="1"> 学习官Banner</option>
                <option value="2"> 国政Banner</option>
            </select>
        </div>
    </div>
    <div class="clearfix"></div>
    <br>
    <div class="form-group">
        <label for="content_type" class="col-sm-2 control-label">内容类别</label>
        <div class="col-sm-4">
            <select name="content_type" id="content_type" class="form-control">
                <option value="video"> 视频</option>
                <option value="article"> 文章</option>
            </select>
        </div>
    </div>

    <div class="clearfix"></div>
    <br>
    <div class="alert alert-danger col-md-6">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <strong>注意 <i class="fa fa-exclamation-triangle"></i> !</strong>
        <p>国政Banner请输入的是文章课程的ID 即视频ID或者文章的ID</p>
        <p>学习官的课程 在下面搜索进行选中即可</p>
        <p>国政与学习官中只可以填写一个，填写两个将以学习官中心为准</p>

    </div>

    <div class="clearfix"></div>
    <br>
    <div class="form-group">
        <label for="content_type" class="col-sm-2 control-label">
            <button class="form-control btn-danger" id="guozheng">
                国政的课程的ID 点我
            </button>
        </label>
        <div class="col-sm-4">
            <input type="text" name="content_id" id="content_id" class="form-control">
        </div>
    </div>


    <div class="clearfix"></div>
    <div class="form-group" style="margin-top: 50px">
        <label for="inputID" class="col-sm-2 control-label text-info">学习官的Banner的课程:</label>
        <div class="col-sm-4">
            <input type="text" placeholder="请输入课程的名称" id="search" class="form-control">
            <div id="serarch_preview">
            </div>
            <input type="hidden" name="lessonsId" id="lessonsId">
        </div>
        <style>
            #serarch_preview li {
                cursor: pointer;
                width: 174px;
            }

            #serarch_preview li:hover {
                background: grey;
            }
        </style>
    </div>
    <div class="clearfix"></div>
    &nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="btn btn-danger UpLoad"
                                    style="width: 30%;margin-top: 50px;margin-bottom: 50px">上传
    </button>
</div>
<script>
    $('#guozheng').on('click', function () {
        $('#modal-guozheng').modal('show');
    })
</script>


<div class="modal fade" id="modal-guozheng">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title text-center">国政课程选择</h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label for="inputID" class="control-label">国政:</label>
                    <div class="">
                        <select name="" id="guo" class="form-control">
                            <option value="">视频</option>
                            @foreach($bookInfo as $k=>$v)
                                <option style="margin-left: 30px" value="{{$v->BookID}}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└&nbsp;{{$v->BookTitle}}</option>
                            @endforeach
                            <option value="">文章</option>
                            @foreach($mindshare as $k=>$v)
                                <option style="margin-left: 30px" value="{{$v->MinSgaID}}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└&nbsp;{{$v->MinSgaTitle}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" id="guochang">确定</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script>
    $(function(){
        $('#guochang').on('click',function(){
            var content_id=$('#guo option:selected').val();
            $('#content_id').val(content_id);
        })
    })
</script>
